﻿
using System;
using System.Collections.Generic;

namespace NetMicro.EventBus.Messages
{
    /// <summary>
    /// 消息传输模型
    /// </summary>
    public class MessageTransfer
    {
        /// <summary>
        /// 事件名称
        /// </summary>
        public string EventName { get; set; }

        /// <summary>
        /// 消息版本
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 事件处理名称
        /// </summary>
        public string EventHandlerName { get; set; }

        /// <summary>
        /// 消息id
        /// </summary>
        public string MsgId { get; set; }

        /// <summary>
        /// 消息体, 事件内容序列化的内容
        /// </summary>
        public string MsgBody { get; set; }

        /// <summary>
        /// 附加数据
        /// </summary>
        public IDictionary<string, string> Items { get; set; }

        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTimeOffset SendAt { get; set; }

        /// <summary>
        /// 消费者执行时间
        /// </summary>
        public DateTimeOffset ExcuteAt { get; set; }

        /// <summary>
        /// 异常信息
        /// </summary>
        public string Exception { get; set; }

       /// <summary>
       /// 重试次数
       /// </summary>
        public int RetryCount { get; set; }

    }
}